import
request
from '@/utils/request2.js'
export default {
  // 获取配置信息/addons/shopro/user/wxMiniProgramOauth
  login(data) {
    return request({
      url: "/addons/shopro/user/wxMiniProgramOauth",
      method: "post",
      data
    })
  },
  // 获取secc_id信息/addons/shopro/user/getWxMiniProgramSessionKey
  session_id(data) {
    return request({
      url: "/addons/shopro/user/getWxMiniProgramSessionKey",
      method: "post",
      data
    })
  },
  // 获取模板信息/addons/shopro/index/template
  template(data) {
    return request({
      url: "/addons/shopro/index/template",
      method: "get",
      data
    })
  },
  // 获列表/addons/shopro/goods/lists
  lists(data) {
    return request({
      url: "/addons/shopro/goods/lists",
      method: "get",
      data
    })
  },
  // 获列表的详情/addons/shopro/goods/detail
  detail(data) {
    return request({
      url: "/addons/shopro/goods/detail",
      method: "get",
      data
    })
  },
  // 加入购物车/addons/shopro/cart/add
  add(data) {
    return request({
      url: "/addons/shopro/cart/add",
      method: "post",
      data
    })
  },
  // 获取默认地址/addons/shopro/address/defaults
  defaults(data) {
    return request({
      url: "/addons/shopro/address/defaults",
      method: "get",
      data
    })
  },
  // 获取优惠卷/addons/shopro/order/coupons
  coupons(data) {
    return request({
      url: "/addons/shopro/order/coupons",
      method: "post",
      data
    })
  },
  // 计算出最后订单详情/addons/shopro/order/pre
  pre(data) {
    return request({
      url: "/addons/shopro/order/pre",
      method: "post",
      data
    })
  },
  // 生成订单/addons/shopro/order/createOrder
  createOrder(data) {
    return request({
      url: "/addons/shopro/order/createOrder",
      method: "post",
      data
    })
  },
  // 余额支付/addons/shopro/pay/prepay
  prepay(data) {
    return request({
      url: "/addons/shopro/pay/prepay",
      method: "post",
      data
    })
  },
  // 购物车数据/addons/shopro/cart
  cart(data) {
    return request({
      url: "/addons/shopro/cart",
      method: "post",
      data
    })
  },
  // 购物车数据加减/addons/shopro/cart/edit
  edit(data) {
    return request({
      url: "/addons/shopro/cart/edit",
      method: "post",
      data
    })
  },
}
